import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";
import { MR_HOPE_AVATAR } from "./logo.js";

export default hopeTheme({
  hostname: "https://gitee.com/xiaochuanlin/my-space",

  author: {
    name: "xchlin",
    url: "https://xiaochuanlin.gitee.io/my-space/",
  },

  iconAssets: "fontawesome-with-brands",

  logo: "/logo.png",

  /** https://gitee.com/xiaochuanlin/my-space/edit/master/my-docs/src/intro.md */
  repo: "https://gitee.com/xiaochuanlin/my-space",
  docsDir: "/my-docs/src",
  docsBranch: "master",

  // 导航栏
  navbar,

  // 侧边栏
  sidebar,

  // 页脚
  footer: "默认页脚",
  displayFooter: false,

  // 博客相关
  blog: {
    description: "一个前端开发者",
    intro: "/intro.html",
    medias: {
      Baidu: "https://www.baidu.com",
      BiliBili: "https://www.bilibili.com/",
      // Bitbucket: "https://bitbucket.org/",
      // Dingding: "https://www.dingtalk.com/",
      // Discord: "https://discord.com/",
      // Dribbble: "https://dribbble.com/",
      Email: "mailto:2986095455@qq.com",
      // Evernote: "https://evernote.com/",
      // Facebook: "https://www.facebook.com/login/",
      // Flipboard: "https://about.flipboard.com/",
      Gitee: "https://gitee.com/",
      GitHub: "https://github.com/",
      // Gitlab: "https://about.gitlab.com/",
      Gmail: "mailto:xiaochuanlin19941109@gmail.com",
      // Instagram: "https://www.instagram.com/",
      // Lark: "https://www.larksuite.com/zh_cn",
      // Lines: "https://line.me/en/",
      // Linkedin: "https://hk.linkedin.com/",
      // Pinterest: "https://www.pinterest.com/",
      // Pocket: "https://getpocket.com/zh/collections",
      QQ: "https://im.qq.com/index/",
      Qzone: "https://qzone.qq.com/",
      // Reddit: "https://support.reddithelp.com/",
      // Rss: "https://rss.com/",
      Steam: "https://store.steampowered.com/",
      // Twitter: "https://twitter.com/?lang=zh",
      Wechat: "https://weixin.qq.com/",
      Weibo: "https://m.weibo.cn/",
      // Whatsapp: "https://www.whatsapp.com/",
      // Youtube: "https://www.youtube.com/",
      Zhihu: "https://www.zhihu.com/",
      MrHope: ["https://xiaochuanlin.gitee.io/my-space/", MR_HOPE_AVATAR],
    },
  },

  // 加密配置
  encrypt: {
    config: {
      "/posts/demo/encrypt.html": ["1109"],
    },
  },

  // 多语言配置
  metaLocales: {
    editLink: "在 Gitee 上编辑此页",
  },

  // 如果想要实时查看任何改变，启用它。注: 这对更新性能有很大负面影响
  // hotReload: true,

  // 在这里配置主题提供的插件
  plugins: {
    blog: true,

    // 启用之前需安装 @waline/client
    // 警告: 这是一个仅供演示的测试服务，在生产环境中请自行部署并使用自己的服务！
    // comment: {
    //   provider: "Waline",
    //   serverURL: "https://waline-comment.vuejs.press",
    // },
		
		search:{
		  maxSuggestions: 10,
		},

    components: {
      components: ["Badge", "VPCard"],
    },

    // 此处开启了很多功能用于演示，你应仅保留用到的功能。
    mdEnhance: {
      align: true,
      attrs: true,
      codetabs: true,
      component: true,
      demo: true,
      figure: true,
      imgLazyload: true,
      imgSize: true,
      include: true,
      mark: true,
      stylize: [
        {
          matcher: "Recommended",
          replacer: ({ tag }) => {
            if (tag === "em")
              return {
                tag: "Badge",
                attrs: { type: "tip" },
                content: "Recommended",
              };
          },
        },
      ],
      sub: true,
      sup: true,
      tabs: true,
      tasklist: true,
      vPre: true,

      // 在启用之前安装 chart.js
      // chart: true,

      // insert component easily

      // 在启用之前安装 echarts
      // echarts: true,

      // 在启用之前安装 flowchart.ts
      // flowchart: true,

      // gfm requires mathjax-full to provide tex support
      // gfm: true,

      // 在启用之前安装 katex
      // katex: true,

      // 在启用之前安装 mathjax-full
      // mathjax: true,

      // 在启用之前安装 mermaid
      // mermaid: true,

      // playground: {
      //   presets: ["ts", "vue"],
      // },

      // 在启用之前安装 reveal.js
      // revealJs: {
      //   plugins: ["highlight", "math", "search", "notes", "zoom"],
      // },

      // 在启用之前安装 @vue/repl
      // vuePlayground: true,

      // install sandpack-vue3 before enabling it
      // sandpack: true,
    },
  },
});
